import Vue from 'vue'
import App from './App.vue'
import router from './router'

import store from './store'
import TypeNav from '@/components/TypeNav'
import Pagination from '@/components/Pagination'
// import Dialog from './components/Dialog'
import Dialog from './components/Dialog'

import ElementUI from 'element-ui';
// 单独引入样式
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);

// 注册全局组件
// Vue.component('TypeNav',TypeNav)
Vue.component(TypeNav.name, TypeNav)
// 注册分页组件
Vue.component(Pagination.name, Pagination)
// 注册弹出框组件
Vue.component(Dialog.name,Dialog)

// 启动mock服务器 一加载mockServer.js文件 就相当于是启动mock服务器了
import '@/mock/mockServer'

// 关闭控制台提示
Vue.config.productionTip = false
// const a = 10
new Vue({
  beforeCreate() {
    Vue.prototype.$bus = this
  },
  render: h => h(App),
  router,
  store   // 注意这里的store一定要小写
}).$mount('#app')
